package com.fitness.front.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fitness.front.modal.member.dto.MemberDto;
import com.fitness.front.modal.member.dto.RegisterFormDto;
import com.fitness.front.modal.member.entity.Member;
import com.fitness.front.modal.member.param.MemberPageQueryParams;
import com.fitness.front.modal.member.param.MemberQueryParams;
import com.fitness.front.modal.member.vo.MemberVO;

public interface IMemberService extends IService<Member> {

    boolean register(RegisterFormDto registerFormDto);

    Member findByMobile(String uuid, String mobile);

    Boolean resetByMobile(String uuid, String password);

    Member editOwn(MemberDto memberEditDTO);

    void logout();

    Boolean modifyPass(Long memberId,String salt, String newPassword);

    /**
     * 获取会员列表
     * @param queryParams
     * @return
     */
    IPage<MemberVO> getMemberPage(MemberQueryParams queryParams);

    /**
     * 禁用会员
     * @param memberId
     * @return
     */
    Boolean forbidden(Long memberId,Boolean diable);

    /**
     * 修改密码
     * @param newPassword
     * @return
     */
    Boolean resetPass(Long memberId,String newPassword);

    Page<MemberVO> getUserPage(MemberPageQueryParams queryParams);

}
